<?
class simg extends Think {

	static function go($img, $w, $h) {
		
		$src = ImageCreateFromJPEG ( $img );
		
		$width = ImageSx ( $src );
		$height = ImageSy ( $src );
		
		$dst = ImageCreateTrueColor ( $w, $h );
		
		ImageCopyResampled ( $dst, $src, 0, 0, 0, 0, $w, $h, $width, $height );
		
		return $dst;
	}
}
?>